1. Technical Field
The present disclosure relates to microcontrollers and in particular microcontrollers including peripherals.
2. Description of the Related Art
Microcontrollers generally include a central unit, memories including a volatile memory and a non-volatile memory, and several peripherals such as external bus controllers, timers, analog-digital converters, digital-analog converters, etc.
Certain microcontrollers have an idle mode during which some of their circuits and particularly all or part of their peripherals are switched off for energy-saving purposes. Generally, the idle mode is left when an external event occurs, and such an exit should be as swift as possible, particularly to react within an acceptable response time to the external event.
In general, microcontrollers execute an initialization procedure when switching on the microcontroller and when leaving the idle mode. This initialization procedure particularly enables state registers and registers for accessing the peripherals to be put into a predefined state. This initialization procedure is generally defined in the form of a sequence of instructions stored in a non-volatile program memory of the microcontroller and is executed by the central unit of the microcontroller. The initialization instruction sequence generally includes for each register to be initialized, an instruction for reading an initialization value in the non-volatile memory and an instruction for writing the read value in the register. This initialization sequence can also be performed by a DMA (Direct Memory Access) transfer unit previously programmed by the central unit of the microcontroller.
The result is that the initialization of the microcontroller is relatively costly in terms of execution time, power consumption and space in the non-volatile memory. The relatively significant time taken to execute this initialization procedure thus limits the use of idle mode and the energy savings likely to be made.
It is thus desirable to provide a means to enable registers of peripherals to be initialized without penalizing the activation time of the microcontroller after switching on the microcontroller or leaving an idle mode.